package io.finer.erp.jeecg.jolimark.print;

import io.finer.erp.jeecg.jolimark.enums.PrinterEnum;
import io.finer.erp.jeecg.jolimark.model.PrintRequestModel;

/**
 * 标签打印
 * 
 * @author Jolimark
 *
 */
public class LabelPrint extends AbstractPrint {
	/**
	 * 打印标签
	 * <p>
	 * 适用场景：应用于客户自定义、批量打印热敏标签，比如商超价标签、店铺商品标签等
	 * </p>
	 * <p>
	 * 适用机型：CLP-180
	 * </p>
	 * 
	 * @param printerEnum
	 * @param labelJSON
	 * @param paperHeight
	 */
	public void print(PrinterEnum printerEnum, String labelJSON, int paperHeight) {
		if (printerEnum != PrinterEnum.CLP180) {
			Out("错误：只支持CLP180打印机");
			return;
		}
		PrintRequestModel model = buildRequest(printerEnum);
		model.setPaperHeight(paperHeight);
		model.setBillContent(labelJSON);

		print("PrintLabel", model);
	}
}
